<?php
/*
  $Id: get_districts_for_zone.php,v 1.23 2003/06/29 22:50:52 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2002 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

  $zone_id = tep_db_prepare_input($HTTP_POST_VARS['zone_id']);
  $districts_query_raw = "select d.district_id, d.district_name from " . TABLE_DISTRICTS . " d where d.district_zone_id=" . $zone_id;
  $districts_query = tep_db_query($districts_query_raw);
  while ($district = tep_db_fetch_array($districts_query)) {
	echo '<option zone_id='.$zone_id." value=".$district['district_id'].">".$district['district_name']."</option>";
  }

  require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>